﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.ObjectBuilder;
using Microsoft.Practices.CompositeWeb;
using Common;

namespace CSC440TeamOne.MyHealth.Views
{
    public class HealthQuestionairePrintPresenter : Presenter<IHealthQuestionairePrintView>
    {

        // NOTE: Uncomment the following code if you want ObjectBuilder to inject the module controller
        //       The code will not work in the Shell module, as a module controller is not created by default
        //
        private IMyHealthController _controller;
        public HealthQuestionairePrintPresenter([CreateNew] IMyHealthController controller)
        {
            _controller = controller;
        }

        public override void OnViewLoaded()
        {
            // TODO: Implement code that will be executed every time the view loads
        }

        public override void OnViewInitialized()
        {
            // TODO: Implement code that will be executed the first time the view loads
        }

        /// <summary>
        /// Get all questions from controller
        /// </summary>
        /// <param name="questionPage"></param>
        /// <returns></returns>
        public List<Question> getAllQuestions()
        {
            return _controller.LoadAllQuestions();
        }
    }
}




